package com.design.design.pattern.behavioral.responsibilitychain;

import org.springframework.util.StringUtils;

public class VideoHandler extends Handler{
    @Override
    public void deploy(Course course) {
        if (!StringUtils.isEmpty(course.getVideo())) {
            System.out.println("含有视频，批准！");
            // 因为继承自 Handler，所以含有handler 对象
            if (handler != null) {
                handler.deploy(course);
            }
        }else {
            System.out.println("不含有视频，不批转， 流程结束");
            return;
        }
    }
}
